{% extends 'content/base_content.html' %}

{% load content_filters %}

{% block content %}
    <div class="content-main">
        <div class="part-of-speech">
            {% for element in parts_of_speech %}
                <a href="{% url 'content:showing_object_category' content_type=content_type object=element.slug %}">
                    {{ element.name }}
                </a>
            {% endfor %}
        </div>
        <h1>Последние добавленные слова:</h1>
        <div class="list_of_words">
            {% for element in parts_of_speech|sort %}
                <div class="head">
                    <h3> {{ element.name }} </h3>
                    <span></span>
                </div>
                <div class="list_of_words_inner">
                    {% for word in element.get_related_words|required_set:5 %}
                        {% if element.name == 'Глаголы' %}
                            {% include 'includes/verb.html' %}
                        {% else %}
                            {% include 'includes/other_words.html' %}
                        {% endif %}
                    {% empty %}
                        <p> Пока еще ничего не добавляли... </p>
                    {% endfor %}
                </div>
            {% endfor %}
        </div>
    </div>
{% endblock content %}
